# -*- coding:utf-8 -*-
# https://wangzhangfei.blog.csdn.net/article/details/108952628
# 文件名：从main后面获取

import os
import sys
import logging

from pylog_utils import pylog

if __name__ == "__main__":
    """test pylog"""
    print("get log:")
    def_file_name = '3.txt'
    if len(sys.argv) <= 1:
        print("get log name: error ! use default name:")
        pass
    else:
        # write_log(sys.argv[1])
        def_file_name = sys.argv[1]
        pass

    obj1 = pylog.pylog(def_file_name)
    obj2 = pylog.pylog(def_file_name)
    obj3 = pylog.pylog(def_file_name)
    obj1.write_info_log("hell")

    print(obj1)
    print(obj2)
    print(obj3)
